package thread;

import thread.Stack;

public class Consumer extends Thread{
	private Stack stack;
//	共享数据，工具方法，用static，否则都不用，面向对象编程，少用static
	public Consumer (Stack stack){
		this.stack=stack;
	}
	@Override
	public void run() {
		while(true){
			char c = stack.pop();
			System.out.println(c);
		}
	}
}
